export default async () => {
    // 配置结果对象
    const config = { entry: {} };

    const webpackArgsConfigs = (await import('./dependencies/args.webpack.mjs')).initWebpackArgsConfigs(true);
    const args = (await import('./utils/args/args.mjs')).handleArgs(webpackArgsConfigs);
    console.log('');
    console.log('[I] =>', 'webpack args:', args);

    const webpackModules = (await import('./dependencies/args.webpack.mjs')).webpackModules;

    // 根据参数配置决定启用哪些配置模块
    for (const module of webpackModules) {
        if (!args[module]) { continue; }
        (await import(`./webpack/${module.substring('enable_'.length)}.mjs`)).default(args, config);
    }

    console.log('');
    console.log('[I] =>', 'webpack config:', config);
    console.log('');

    // 返回配置结果对象
    return config;
};
